
<html>
<head>
<script language="JavaScript">
function right(e)
	{
		if (navigator.appName == 'Netscape' && 
		(e.which == 3 || e.which == 2))
			return false;
		else if (navigator.appName == 'Microsoft Internet Explorer' && 
		(event.button == 2 || event.button == 3))
		{
			alert("you are not allowed to do right click");
			return false;
		}
		return true;
	}
		
	function TBGlobalMouseUp() {
		document.onmouseup=right;
		if (document.layers) window.captureEvents(Event.MOUSEUP);
		window.onmouseup=right;
	}
	function TBGlobalMouseDown() {
		document.onmousedown=right;
		if (document.layers) window.captureEvents(Event.MOUSEDOWN);
		window.onmousedown=right;
	}
		TBGlobalMouseUp();
		TBGlobalMouseDown()
</script>		

	<title>Insert Drop Down</title>
	<style type="text/css">  
	TD {FONT-SIZE: 8pt; FONT-FAMILY: tahoma, verdana, Arial, Helvetica, sans-serif}
	.tbColor {cursor:hand;}
	</style>
	
		<script language="JavaScript">
		function submitbut()
		{
		var tname=window.opener.Trim(document.myform.theName.value);
		if (tname=="")
		{
		alert("please enter select drop down name");
		document.myform.theName.value="";
		document.myform.theName.focus();
		return false;
		}
		document.myform.action="select_submit.php";
		document.myform.submit();
	}
	</script>	
</head>
<link rel="stylesheet" href="css/winie.css" type="text/css">
<?
if(isset($HTTP_POST_VARS["theName"]))
{
	$theName=trim($HTTP_POST_VARS["theName"]);
}
else
{
	$theName="";
}
if(isset($HTTP_POST_VARS["theSize"]))
{
	$theSize=trim($HTTP_POST_VARS["theSize"]);
}
else
{
	$theSize="";
}
if(isset($HTTP_POST_VARS["theNoOptions"]))
{
	$theNoOptions=trim($HTTP_POST_VARS["theNoOptions"]);
	if($theNoOptions=="")
	{
		$theNoOptions=1;
	}
}
else
{
	$theNoOptions=1;
}

?>
<body bgcolor=buttonface topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<form name="myform" method="post" action="select.php">
<table align="center" border="0"><tr><td>
<fieldset style="padding:3px;" title="Submit Button Information"><legend style="height: 15px;">Select Tag</legend>
<table align="center" border="0"><tr><td>
<fieldset style="padding:3px;" title="Tag Attributes"><legend style="height: 15px;">Tag Attributes</legend>
<table align="center" border="0" width="250" cellpadding="3" cellspacing="0">
<tr>
	<td align="left">Name:</td>
	<td><input type="text" name="theName" value="<?=$theName?>" size="15" maxlength="50"></td>
</tr>
<tr>
	<td align="left">Size:</td>
	<td><input type="text" name="theSize" value="<?=$theSize?>" size="4" maxlength="3"></td>
</tr>
<tr>	
	<td align="left">No of Options:</td>
	<td>
		<select name="theNoOptions" onchange="javascript:document.myform.submit();">
		<?
		for($i=1;$i<=100;$i++)
		{
		if($theNoOptions==$i)
		{
		?>
			<option value=<?=$i?> selected><?=$i?>
		<?
		}	
		else
		{
		?>
		<option value=<?=$i?>><?=$i?>
		<?
		}
		}
		?>			
		</select>
	</td>
</tr>

<tr>
	<td colspan=2>
		<table cellpadding="0" cellspacing="0" width="100%">
		<tr>
			<td>&nbsp;</td>
			<td align="center"><font size=1 face=verdana>Value</font></td>
			<td align="center"><font size=1 face=verdana>Selected</font></td>
		</tr>
		
			<?
			for($j=1;$j<=$theNoOptions;$j++)
		    {
			?>
			<tr>
			<td align="center"><font size=1 face=verdana>option<?=$j?></font></td>
			<td align="center"><font size=1 face=verdana><input type=text size=15 name=option<?=$j?>></font></td>
			<td align="center"><font size=1 face=verdana><input type=radio name=radioselect value="<?=$j?>" <?if($j==1){?>checked<?}?>></font></td>
			</tr>
		<?	
			}
		?>
		
		</table>
	</td>
</tr>
</table>
</fieldset>
</td></tr>
<tr>
	<td align="center">
	<input type="button" name="insertsubmit" value="     OK     " onclick="javascript:return submitbut();">
	<input type="button" name="CANCEL" value="CANCEL" onClick="window.close();">
	</td>
</tr>
</table>
</fieldset>
</td></tr></table>
</form>
</body>
</html>
